import request from "@/utils/request";
/**
* @exports 用户删除
* @param params 
* @returns Promise
*/
export const deleteUser = (params: RestIdParam) => {
    return request.post<RestResult<string>>("/mgt/user/deleteUser", params);
}

/**
* @exports 用户详情-根据用户ID查询
* @param params 
* @returns Promise
*/
export const detail = (params: RestIdParam) => {
    return request.post<RestResult<UserVO>>("/mgt/user/detail", params);
}

/**
* @exports 忘记密码
* @param params 
* @returns Promise
*/
export const forgotPassword = (params: UserForgotPasswordParam) => {
    return request.post<RestResult<UserLoginVO>>("/mgt/user/forgotPassword", params);
}

/**
* @exports 生成图形验证码
* @param params 
* @returns Promise
*/
export const generateValidateCode = (params: any) => {
    return request.post<RestResult<RandomCodeVO>>("/mgt/user/generateValidateCode", params);
}

/**
* @exports 账号密码登录
* @param params 
* @returns Promise
*/
export const login = (params: UserLoginParam) => {
    return request.post<RestResult<UserLoginVO>>("/mgt/user/login", params);
}

/**
* @exports 手机号验证码登录
* @param params 
* @returns Promise
*/
export const loginForMobile = (params: UserMobileCodeLoginParam) => {
    return request.post<RestResult<UserLoginVO>>("/mgt/user/loginForMobile", params);
}

/**
* @exports 退出登录
* @param params 
* @returns Promise
*/
export const logout = (params: RestCommonParam) => {
    return request.post<RestResult<string>>("/mgt/user/logout", params);
}

/**
* @exports 重置密码
* @param params 
* @returns Promise
*/
export const pwdReset = (params: UserPwdResetParam) => {
    return request.post<RestResult<string>>("/mgt/user/pwdReset", params);
}

/**
* @exports 用户列表
* @param params 
* @returns Promise
*/
export const queryPageUser = (params: UserSearchParam) => {
    return request.post<RestResult<PageVO<UserVO>>>("/mgt/user/queryPageUser", params);
}

/**
* @exports 用户新增
* @param params 
* @returns Promise
*/
export const save = (params: UserSaveParam) => {
    return request.post<RestResult<IdVO>>("/mgt/user/save", params);
}

/**
* @exports 用户权限列表
* @param params 
* @returns Promise
*/
export const showPermissions = (params: RestCommonParam) => {
    return request.post<RestResult<List<PermissionVO>>>("/mgt/user/showPermissions", params);
}

/**
* @exports 个人中心-切换账号
* @param params 
* @returns Promise
*/
export const switchAccount = (params: UserSwitchAccountParam) => {
    return request.post<RestResult<UserLoginVO>>("/mgt/user/switchAccount", params);
}

/**
* @exports 用户编辑
* @param params 
* @returns Promise
*/
export const update = (params: UserSaveParam) => {
    return request.post<RestResult<string>>("/mgt/user/update", params);
}

/**
* @exports 个人中心-修改密码
* @param params 
* @returns Promise
*/
export const updatePwd = (params: UserPwdUpdateParam) => {
    return request.post<RestResult<string>>("/mgt/user/updatePwd", params);
}

/**
* @exports 用户禁启用按钮
* @param params 
* @returns Promise
*/
export const updateStatus = (params: UpdateStatusParam) => {
    return request.post<RestResult<string>>("/mgt/user/updateStatus", params);
}

/**
* @exports 用户列表-下拉用户列表
* @param params 
* @returns Promise
*/
export const userDropDownList = (params: UserDropDownParam) => {
    return request.post<RestResult<List<UserSimpleVO>>>("/mgt/user/userDropDownList", params);
}
